package com.pl.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.io.Serializable;

/**
 * (Order)实体类
 *
 * @author makejava
 * @since 2024-05-05 20:12:17
 */
public class Order implements Serializable {
    private static final long serialVersionUID = -81632162798586499L;
    /**
     * 订单ID
     */
    @ExcelProperty(value = "订单ID")
    @ColumnWidth(value =30)
    private Integer oid;
    /**
     * 订单详情
     */
    @ExcelProperty(value = "订单详情")
    @ColumnWidth(value =30)
    private String oinfo;
    /**
     * 零件ID
     */
    @ExcelProperty(value = "零件ID")
    @ColumnWidth(value =30)
    private Integer pid;
    /**
     * 采购数量
     */
    @ExcelProperty(value = "采购数量")
    @ColumnWidth(value =30)
    private Integer num;
    /**
     * 总价
     */
    @ExcelProperty(value = "总价")
    @ColumnWidth(value =30)
    private Double allprice;
    /**
     * 订单时间
     */
    @ExcelProperty(value = "订单时间")
    @ColumnWidth(value =30)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    //  @JsonFormat  1将接收得到的json数据中对应birthday 时间转换 java中Date
    //               2.处理器方法返回json数据时 将java中Date  转换为对应的字符串时间   yyyy-MM-dd
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date odate;


    public Integer getOid() {
        return oid;
    }

    public void setOid(Integer oid) {
        this.oid = oid;
    }

    public String getOinfo() {
        return oinfo;
    }

    public void setOinfo(String oinfo) {
        this.oinfo = oinfo;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Double getAllprice() {
        return allprice;
    }

    public void setAllprice(Double allprice) {
        this.allprice = allprice;
    }

    public Date getOdate() {
        return odate;
    }

    public void setOdate(Date odate) {
        this.odate = odate;
    }

}

